package com.daisuxia.web.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.daisuxia.web.pojo.BorrowOrder;
import com.daisuxia.web.pojo.RiskCreditUser;

import java.util.Map;

public interface IBorrowOrderDao {
	int findTerm(Integer id);
    int deleteByPrimaryKey(Integer id);

    int insert(BorrowOrder record);

    int insertSelective(BorrowOrder record);

    BorrowOrder selectByPrimaryKey(Integer id);
    /**
     * 根据订单号查询订单
     * @author zhangsh Tel:13817876783
     * @date 2017年9月25日 上午9:15:18
     * @Title selectByOutOrderNumber
     * @Description 
     * @param orderNumber
     * @return BorrowOrder 
     * @throws
     */
    BorrowOrder selectByOutOrderNumber(String orderNumber);
    
    BorrowOrder selectByParam(HashMap<String, Object> params);
    
    
    
    List<BorrowOrder> findParams(HashMap<String, Object> params);
    
    int updateByPrimaryKeySelective(BorrowOrder record);

    int updateByPrimaryKeyWithBLOBs(BorrowOrder record);

    int updateByPrimaryKey(BorrowOrder record);
    /**
     * 查询放款成功对应的借款金额
     * @param params
     * @return
     */
    Long findMoneyAmountSucSum(HashMap<String,Object> params);
    /**
     * 实际放款成功金额
     * @param params
     * @return
     */
    Long findIntoMoneySucSum(HashMap<String,Object> params);
    int insertRiskUser(RiskCreditUser risk);
    int updateRiskCreditUserById(com.daisuxia.risk.pojo.RiskCreditUser   riskCreditUser);
    int findParamsCount(HashMap<String, Object> params);
	BorrowOrder selectBorrowOrderUseId(Integer userId);
	/**
	 * 根据用户查询申请列表
	 * @param userId
	 * @return
	 */
	List<BorrowOrder> findByUserId(Integer userId);
	
	
	
	 List<BorrowOrder> findParamsTLO(HashMap<String, Object> params);
	 int updateByPrimaryKeySelectiveTLO(BorrowOrder record);
	   BorrowOrder selectByParamTLO(HashMap<String, Object> params);
	   /**
	    * 批量插入合同资方数据
	    * @param boNewList
	    * @return
	    */
	   int batchInsertBCI(@Param(value = "boNewList")    List<BorrowOrder> boNewList );

	   
	 public List<BorrowOrder> findAssetBorrowOrderForZhimaFeedback(HashMap<String,Object> paraMap);

}